home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16285 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c,,comp.lang.c++
  4. Subject: Re: functions to detect memory use
  5. Date: 9 Apr 1996 19:40:05 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kf725INN548@keats.ugrad.cs.ubc.ca>
  8. References: <4kec2g$1ep8@msunews.cl.msu.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4kec2g$1ep8@msunews.cl.msu.edu>,
  12. Jianguo Liu  <jliu@perm.fw.msu.edu> wrote:
  13. >Hi Everyone:
  14. >
  15. >I am new to Sun SPARComiler C++ 4.0.1 in Solaris 2.4 but 
  16. >trying to detect memory use in a c/c++ program. 
  17. >I would appreciate it if you could tell me which 
  18. >functions I should use to find out how much memory 
  19. >has been used and how much is available when the program is
  20. >running. Which "include" file(s) should I use? Thanks in 
  21. >advance for your help!
  22.  
  23. man ps
  24.     - for listing processes: their ->*sizes<*-, states, PIDS and parent          PIDS, ownerships, etc.
  25.  
  26. man top
  27.     - a common interactive utility for measuring the CPU usage of the
  28.       processes that are using the most CPU time. You might have it.
  29.  
  30. man time
  31.     - a command which runs another command and tells you how much
  32.       time elapsed, how much CPU time was spent (%), how much time
  33.       was spent executing kernel code and how much in user code.
  34.  
  35. man vmstat
  36.     - a command to see what is going on in the guts of the system.
  37.       can provide a periodic display of paging activity, disk block
  38.       transfers, context switches, interrupts, system/user CPU usage,
  39.       idle time, buffer space usage, swap usage. vmstat 1 calculates
  40.       and prints these over each second.
  41.  
  42. -- 
  43.  
  44.